+Wed Jan 13 13:28:00 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+ that expose events will be generated.
+ (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+ (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+ (gtk_widget_size_allocate): we don't need a queue_clear on changing
+ allocations of !NO_WINDOW widgets, we do still need a full redraw for
+ them though.
+
+ * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+ actually differs from the original.
+
Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
+Wed Jan 13 13:28:00 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+ that expose events will be generated.
+ (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+ (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+ (gtk_widget_size_allocate): we don't need a queue_clear on changing
+ allocations of !NO_WINDOW widgets, we do still need a full redraw for
+ them though.
+
+ * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+ actually differs from the original.
+
Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
+Wed Jan 13 13:28:00 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+ that expose events will be generated.
+ (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+ (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+ (gtk_widget_size_allocate): we don't need a queue_clear on changing
+ allocations of !NO_WINDOW widgets, we do still need a full redraw for
+ them though.
+
+ * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+ actually differs from the original.
+
Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
+Wed Jan 13 13:28:00 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+ that expose events will be generated.
+ (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+ (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+ (gtk_widget_size_allocate): we don't need a queue_clear on changing
+ allocations of !NO_WINDOW widgets, we do still need a full redraw for
+ them though.
+
+ * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+ actually differs from the original.
+
Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
+Wed Jan 13 13:28:00 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+ that expose events will be generated.
+ (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+ (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+ (gtk_widget_size_allocate): we don't need a queue_clear on changing
+ allocations of !NO_WINDOW widgets, we do still need a full redraw for
+ them though.
+
+ * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+ actually differs from the original.
+
Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
+Wed Jan 13 13:28:00 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+ that expose events will be generated.
+ (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+ (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+ (gtk_widget_size_allocate): we don't need a queue_clear on changing
+ allocations of !NO_WINDOW widgets, we do still need a full redraw for
+ them though.
+
+ * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+ actually differs from the original.
+
Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
+Wed Jan 13 13:28:00 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+ that expose events will be generated.
+ (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+ (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+ (gtk_widget_size_allocate): we don't need a queue_clear on changing
+ allocations of !NO_WINDOW widgets, we do still need a full redraw for
+ them though.
+
+ * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+ actually differs from the original.
+
Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
#undef HAVE_SYS_SELECT_H
#undef HAVE_XCONVERTCASE
+#undef WITH_SYMBOL_UNDERSCORE
+
#undef NO_FD_SET
#undef RESOURCE_BASE
g_return_if_fail (label != NULL);
g_return_if_fail (GTK_IS_LABEL (label));
g_return_if_fail (str != NULL);
-
- /* Convert text to wide characters */
- len = strlen (str);
- str_wc = g_new (GdkWChar, len + 1);
- wc_len = gdk_mbstowcs (str_wc, str, len + 1);
- str_wc[wc_len] = '\0';
-
- gtk_label_set_text_internal (label, g_strdup (str), str_wc);
+
+ if (!label->label || strcmp (label->label, str))
+ {
+ /* Convert text to wide characters */
+ len = strlen (str);
+ str_wc = g_new (GdkWChar, len + 1);
+ wc_len = gdk_mbstowcs (str_wc, str, len + 1);
+ str_wc[wc_len] = '\0';
+
+ gtk_label_set_text_internal (label, g_strdup (str), str_wc);
+ }
}
void
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[MAP]);
- gtk_widget_queue_draw (widget);
+ if (GTK_WIDGET_NO_WINDOW (widget))
+ gtk_widget_queue_draw (widget);
}
}
if (GTK_WIDGET_MAPPED (widget))
{
- gtk_widget_queue_clear_child (widget);
+ if (GTK_WIDGET_NO_WINDOW (widget))
+ gtk_widget_queue_clear_child (widget);
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[UNMAP]);
}
}
else if (widget->allocation.width != real_allocation.width ||
widget->allocation.height != real_allocation.height)
{
- gtk_widget_queue_clear_child (widget);
needs_draw = TRUE;
}